package leave.status;

import java.util.*;

public enum CompensationClaimStatus {
	QUALIFIED("Qualified"),
	NOT_QUALIFIED("Not Qualified"),
	APPROVED("Approved"),
	REJECTED("Rejected"),
	CANCELLED("Cancelled"),
	DELETED("Deleted");
	
	private String description;
	
	CompensationClaimStatus(String description){
		this.description = description;
	}
	
	public static CompensationClaimStatus getStatus(String description){
		HashMap<String, CompensationClaimStatus> StatusMap = new HashMap<String, CompensationClaimStatus>();
		StatusMap.put(CompensationClaimStatus.QUALIFIED.getStatusDescription(), CompensationClaimStatus.QUALIFIED);
		StatusMap.put(CompensationClaimStatus.NOT_QUALIFIED.getStatusDescription(), CompensationClaimStatus.NOT_QUALIFIED);
		StatusMap.put(CompensationClaimStatus.APPROVED.getStatusDescription(), CompensationClaimStatus.APPROVED);
		StatusMap.put(CompensationClaimStatus.REJECTED.getStatusDescription(), CompensationClaimStatus.REJECTED);
		StatusMap.put(CompensationClaimStatus.CANCELLED.getStatusDescription(), CompensationClaimStatus.CANCELLED);
		StatusMap.put(CompensationClaimStatus.DELETED.getStatusDescription(), CompensationClaimStatus.DELETED);
		return (CompensationClaimStatus) StatusMap.get(description);
	}
	
	public String getStatusDescription(){
		return description;
	}
	
}
